<?php

/**
 * @copyright 2011
 * @version $Id$
 * @access public
 */
class Default_Model_Facade_Search{
	
	/**
	 * Constructor de la clase
	 * @return void
	 */
	public function  __construct() {
        
        }
	
	/**
	 * @param mixed $resource: Objeto con los datos del recurso a leer.
	 * @return array $data
	 */
	public function searcher($to=null)
    {
        $TBD_Resource = new Default_Model_Search();
        try{
        	
			$data = $TBD_Resource->searcher($to);
        	
            return $data;
        }catch(Exception $e)
        {
            $error=array($e->getFile(), 'Exception: '.$e->getMessage());
            $ExceptionHandler= new Default_Model_ExceptionHandler();
        	$ExceptionHandler->saveErrors($error);
    	}
	}

	/**
	 * @return array $data
	 */
	public function getFirstDateProduct()
	{
		$TBD_Resource = new Default_Model_Search();
		try{

			$data = $TBD_Resource->getFirstDateProduct();

			return $data;
		}catch(Exception $e)
		{
			$error=array($e->getFile(), 'Exception: '.$e->getMessage());
			$ExceptionHandler= new Default_Model_ExceptionHandler();
			$ExceptionHandler->saveErrors($error);
		}
	}


	/**
	 * @return array $data
	 */
	public function getLastDateProduct()
	{
		$TBD_Resource = new Default_Model_Search();
		try{
			$data = $TBD_Resource->getLastDateProduct();
			return $data;
		}catch(Exception $e)
		{
			$error=array($e->getFile(), 'Exception: '.$e->getMessage());
			$ExceptionHandler= new Default_Model_ExceptionHandler();
			$ExceptionHandler->saveErrors($error);
		}
	}


	


}